﻿Imports System.Linq

Public Class RecentBackupRepository

    Private dc As New TanNamChinhDataContext

    Public Function SelectAllRecord() As IQueryable(Of tblRecentBackup)
        Dim query = From p In dc.tblRecentBackups
                Select p
        Return query
    End Function

    Public Function GetTop10RecentBackupList() As IQueryable(Of tblRecentBackup)
        Dim query = SelectAllRecord().Take(10)
        Return query
    End Function

    Public Sub Insert(ByVal obj As tblRecentBackup)
        dc.tblRecentBackups.InsertOnSubmit(obj)
        dc.SubmitChanges()
    End Sub
End Class
